1. Field of the Invention
The present invention relates to an improved three-dimensional measuring method. More concretely, the invention relates to improved pattern projection-type three-dimensional measuring method and device, and a computer program. Particularly, the invention relates to a method of making stripes of a stripe pattern on a pattern mask correspond to stripes on a projected image.
2. Description of the Related Art
As a method of three-dimensionally measuring an object with a high speed, a method of projecting a stripe pattern onto the object is known. In this method, a stripe pattern is projected on an object and is photographed, and a three-dimensional shape of the object is obtained from a deformed state of the stripe pattern on the obtained image. As the stripe pattern, stripes having light quantity distribution (density distribution) of a sinusoid are normally used, and their phase shift is utilized.
This method has two problems. One is that it is difficult to heighten resolution (measuring accuracy). In order to heighten the resolution, gaps between the stripes in the stripe pattern may be narrowed. However, since the pixel density of an imaging device has a limitation, if the gaps between the stripes are narrowed much, a phase detecting ability is deteriorated due to a rounding error caused by digitization.
The other problem is that it is difficult to make projected stripes correspond to stripes on an image because the stripe pattern is a repeated pattern. If the correspondence is made improperly, when a shape of the object is reproduced, greatly incorrect result is obtained. When the gaps between the stripes are widened, the correspondence becomes easy, but the resolution is deteriorated, namely, a trade-off relationship is established.
In order to solve these problems, there suggests a method of projecting a stripe pattern onto an object with phases being different, and obtaining a three-dimensional shape based on photographed images with the respective phases. Normally, the phases are shifted by 90° and the objects are photographed four times so that four images are obtained and are analyzed. This is known as a phase shift-type stripe pattern projecting method.
According to this method, the resolution can be heightened without narrowing the gaps between the stripes, but there is a disadvantage that it takes a long time to shift the phases stably. Moreover, the problem that the correspondence of the stripes is difficult still remains.
There is a method using a color stripe pattern instead of a monochrome stripe pattern.
One of these approaches, there is a method of projecting a spectrum-type stripe pattern, a wavelength of which changes successively, and in this method, colors have one to one correspondence to angles of projection.
For example, there suggests a three-dimensional measuring device for projecting a spectrum pattern on to an object and imaging an image as a multi-band color image (Japanese Patent Publication No 3-52001 (1991)). This device codes an angle of projection by means of a wavelength, and a projection pattern changes continuously according to an arrangement of wavelengths.
However, this method requires a spectrometer for generating a spectral pattern which covers a predetermined range in a projection system. Moreover, since a fine difference in color should be discriminated in light receiving system, an accurate color reading device is required to heighten the resolution sufficiently.
In addition, there suggests a method of projecting a repeated pattern of stripes having three colors R, G and B. However, because it is three-color repeated pattern, positions of stripes cannot be specified only by the colors on the stripes. For this reason it is necessary to count from a reference stripe having different color from the three colors to an objective stripe. However, in the case where discontinuous of stripes exists due to unevenness of the surface of the object a number of stripes cannot be counted properly.